<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:py="http://genshi.edgewall.org/">
    <xi:include href="master.html" />

<?python from mnemoply import model ?>

<head />

<body>
    <h2>Debtors by payment</h2>

    <table class="maintable">
        <thead>
        <tr>
            <th>Student</th>
            <th>Groups</th>
            <th>Balance</th>
        </tr>
        </thead>

        <tbody>

        <tr py:for="student, balance in debtors">
            <td>
                <a href="/Student/${student.id}/">${student.title}</a>
            </td>

            <td>
                <a py:for="sig in model.StudentInGroup.selectBy(student=student)"
                    href="/Group/${sig.group.id}/"
                    py:content="sig.group.title" />
            </td>

            <td>${balance}</td>
        </tr>

        </tbody>
    </table>

    <br />

    <span>${ET(tg.back_widget())}</span>
</body>
</html>
